"""
终端A岛的一些通用函数
"""

import os
import platform

def cleanScreen():
    if platform.system() == 'Windows':
        os.system("CLS")
    else:
        print('\033c')

def getDomain(url):
    url = url.strip()
    if url.startswith('http'):
        index = 9 + url[9:].index('/')
    else:
        index = url.index('/')
    return url[:index]

def joinStrip(ls):
    return (''.join(ls)).strip()

if __name__ == "__main__":
    cleanScreen()